3.829 \(\int \frac{\sin ^3(c+d x) \tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=155 \[ -\frac{\cos (c+d x)}{a^2 d}-\frac{2 \tan ^7(c+d x)}{7 a^2 d}+\frac{2 \tan ^5(c+d x)}{5 a^2 d}-\frac{2 \tan ^3(c+d x)}{3 a^2 d}+\frac{2 \tan (c+d x)}{a^2 d}+\frac{2 \sec ^7(c+d x)}{7 a^2 d}-\frac{7 \sec ^5(c+d x)}{5 a^2 d}+\frac{3 \sec ^3(c+d x)}{a^2 d}-\frac{5 \sec (c+d x)}{a^2 d}-\frac{2 x}{a^2} \]

[Out]

(-2*x)/a^2 - Cos[c + d*x]/(a^2*d) - (5*Sec[c + d*x])/(a^2*d) + (3*Sec[c + d*x]^3)/(a^2*d) - (7*Sec[c + d*x]^5)
/(5*a^2*d) + (2*Sec[c + d*x]^7)/(7*a^2*d) + (2*Tan[c + d*x])/(a^2*d) - (2*Tan[c + d*x]^3)/(3*a^2*d) + (2*Tan[c
 + d*x]^5)/(5*a^2*d) - (2*Tan[c + d*x]^7)/(7*a^2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.289752, antiderivative size = 155, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 8, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.276, Rules used = {2875, 2873, 2606, 194, 3473, 8, 2590, 270} \[ -\frac{\cos (c+d x)}{a^2 d}-\frac{2 \tan ^7(c+d x)}{7 a^2 d}+\frac{2 \tan ^5(c+d x)}{5 a^2 d}-\frac{2 \tan ^3(c+d x)}{3 a^2 d}+\frac{2 \tan (c+d x)}{a^2 d}+\frac{2 \sec ^7(c+d x)}{7 a^2 d}-\frac{7 \sec ^5(c+d x)}{5 a^2 d}+\frac{3 \sec ^3(c+d x)}{a^2 d}-\frac{5 \sec (c+d x)}{a^2 d}-\frac{2 x}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(Sin[c + d*x]^3*Tan[c + d*x]^4)/(a + a*Sin[c + d*x])^2,x]

[Out]

(-2*x)/a^2 - Cos[c + d*x]/(a^2*d) - (5*Sec[c + d*x])/(a^2*d) + (3*Sec[c + d*x]^3)/(a^2*d) - (7*Sec[c + d*x]^5)
/(5*a^2*d) + (2*Sec[c + d*x]^7)/(7*a^2*d) + (2*Tan[c + d*x])/(a^2*d) - (2*Tan[c + d*x]^3)/(3*a^2*d) + (2*Tan[c
 + d*x]^5)/(5*a^2*d) - (2*Tan[c + d*x]^7)/(7*a^2*d)

Rule 2875

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Dist[(a/g)^(2*m), Int[((g*Cos[e + f*x])^(2*m + p)*(d*Sin[e + f*x])^n)/(a - b*Sin[e +
 f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 194

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2590

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{\sin ^3(c+d x) \tan ^4(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac{\int \sec (c+d x) (a-a \sin (c+d x))^2 \tan ^7(c+d x) \, dx}{a^4}\\ &=\frac{\int \left (a^2 \sec (c+d x) \tan ^7(c+d x)-2 a^2 \tan ^8(c+d x)+a^2 \sin (c+d x) \tan ^8(c+d x)\right ) \, dx}{a^4}\\ &=\frac{\int \sec (c+d x) \tan ^7(c+d x) \, dx}{a^2}+\frac{\int \sin (c+d x) \tan ^8(c+d x) \, dx}{a^2}-\frac{2 \int \tan ^8(c+d x) \, dx}{a^2}\\ &=-\frac{2 \tan ^7(c+d x)}{7 a^2 d}+\frac{2 \int \tan ^6(c+d x) \, dx}{a^2}-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^4}{x^8} \, dx,x,\cos (c+d x)\right )}{a^2 d}+\frac{\operatorname{Subst}\left (\int \left (-1+x^2\right )^3 \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac{2 \tan ^5(c+d x)}{5 a^2 d}-\frac{2 \tan ^7(c+d x)}{7 a^2 d}-\frac{2 \int \tan ^4(c+d x) \, dx}{a^2}-\frac{\operatorname{Subst}\left (\int \left (1+\frac{1}{x^8}-\frac{4}{x^6}+\frac{6}{x^4}-\frac{4}{x^2}\right ) \, dx,x,\cos (c+d x)\right )}{a^2 d}+\frac{\operatorname{Subst}\left (\int \left (-1+3 x^2-3 x^4+x^6\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac{\cos (c+d x)}{a^2 d}-\frac{5 \sec (c+d x)}{a^2 d}+\frac{3 \sec ^3(c+d x)}{a^2 d}-\frac{7 \sec ^5(c+d x)}{5 a^2 d}+\frac{2 \sec ^7(c+d x)}{7 a^2 d}-\frac{2 \tan ^3(c+d x)}{3 a^2 d}+\frac{2 \tan ^5(c+d x)}{5 a^2 d}-\frac{2 \tan ^7(c+d x)}{7 a^2 d}+\frac{2 \int \tan ^2(c+d x) \, dx}{a^2}\\ &=-\frac{\cos (c+d x)}{a^2 d}-\frac{5 \sec (c+d x)}{a^2 d}+\frac{3 \sec ^3(c+d x)}{a^2 d}-\frac{7 \sec ^5(c+d x)}{5 a^2 d}+\frac{2 \sec ^7(c+d x)}{7 a^2 d}+\frac{2 \tan (c+d x)}{a^2 d}-\frac{2 \tan ^3(c+d x)}{3 a^2 d}+\frac{2 \tan ^5(c+d x)}{5 a^2 d}-\frac{2 \tan ^7(c+d x)}{7 a^2 d}-\frac{2 \int 1 \, dx}{a^2}\\ &=-\frac{2 x}{a^2}-\frac{\cos (c+d x)}{a^2 d}-\frac{5 \sec (c+d x)}{a^2 d}+\frac{3 \sec ^3(c+d x)}{a^2 d}-\frac{7 \sec ^5(c+d x)}{5 a^2 d}+\frac{2 \sec ^7(c+d x)}{7 a^2 d}+\frac{2 \tan (c+d x)}{a^2 d}-\frac{2 \tan ^3(c+d x)}{3 a^2 d}+\frac{2 \tan ^5(c+d x)}{5 a^2 d}-\frac{2 \tan ^7(c+d x)}{7 a^2 d}\\ \end{align*}

Mathematica [A]  time = 0.779097, size = 267, normalized size = 1.72 \[ -\frac{5488 \sin (c+d x)+6720 c \sin (2 (c+d x))+6720 d x \sin (2 (c+d x))-13224 \sin (2 (c+d x))+8376 \sin (3 (c+d x))+3360 c \sin (4 (c+d x))+3360 d x \sin (4 (c+d x))-6612 \sin (4 (c+d x))+2248 \sin (5 (c+d x))+42 (280 c+280 d x-551) \cos (c+d x)+14834 \cos (2 (c+d x))+2520 c \cos (3 (c+d x))+2520 d x \cos (3 (c+d x))-4959 \cos (3 (c+d x))+1852 \cos (4 (c+d x))-840 c \cos (5 (c+d x))-840 d x \cos (5 (c+d x))+1653 \cos (5 (c+d x))-210 \cos (6 (c+d x))+11172}{6720 a^2 d \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )^3 \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^7} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sin[c + d*x]^3*Tan[c + d*x]^4)/(a + a*Sin[c + d*x])^2,x]

[Out]

-(11172 + 42*(-551 + 280*c + 280*d*x)*Cos[c + d*x] + 14834*Cos[2*(c + d*x)] - 4959*Cos[3*(c + d*x)] + 2520*c*C
os[3*(c + d*x)] + 2520*d*x*Cos[3*(c + d*x)] + 1852*Cos[4*(c + d*x)] + 1653*Cos[5*(c + d*x)] - 840*c*Cos[5*(c +
 d*x)] - 840*d*x*Cos[5*(c + d*x)] - 210*Cos[6*(c + d*x)] + 5488*Sin[c + d*x] - 13224*Sin[2*(c + d*x)] + 6720*c
*Sin[2*(c + d*x)] + 6720*d*x*Sin[2*(c + d*x)] + 8376*Sin[3*(c + d*x)] - 6612*Sin[4*(c + d*x)] + 3360*c*Sin[4*(
c + d*x)] + 3360*d*x*Sin[4*(c + d*x)] + 2248*Sin[5*(c + d*x)])/(6720*a^2*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2
])^3*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^7)

________________________________________________________________________________________

Maple [A]  time = 0.144, size = 253, normalized size = 1.6 \begin{align*} -{\frac{1}{12\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) ^{-3}}-{\frac{1}{8\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) ^{-2}}+{\frac{1}{2\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) ^{-1}}-2\,{\frac{1}{d{a}^{2} \left ( 1+ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2} \right ) }}-4\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{2}}}+{\frac{4}{7\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-7}}-2\,{\frac{1}{d{a}^{2} \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{6}}}+{\frac{6}{5\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-5}}+2\,{\frac{1}{d{a}^{2} \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) ^{4}}}-{\frac{1}{12\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-3}}-{\frac{23}{8\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-2}}-{\frac{9}{2\,d{a}^{2}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4*sin(d*x+c)^7/(a+a*sin(d*x+c))^2,x)

[Out]

-1/12/d/a^2/(tan(1/2*d*x+1/2*c)-1)^3-1/8/d/a^2/(tan(1/2*d*x+1/2*c)-1)^2+1/2/d/a^2/(tan(1/2*d*x+1/2*c)-1)-2/d/a
^2/(1+tan(1/2*d*x+1/2*c)^2)-4/d/a^2*arctan(tan(1/2*d*x+1/2*c))+4/7/d/a^2/(tan(1/2*d*x+1/2*c)+1)^7-2/d/a^2/(tan
(1/2*d*x+1/2*c)+1)^6+6/5/d/a^2/(tan(1/2*d*x+1/2*c)+1)^5+2/d/a^2/(tan(1/2*d*x+1/2*c)+1)^4-1/12/d/a^2/(tan(1/2*d
*x+1/2*c)+1)^3-23/8/d/a^2/(tan(1/2*d*x+1/2*c)+1)^2-9/2/d/a^2/(tan(1/2*d*x+1/2*c)+1)

________________________________________________________________________________________

Maxima [B]  time = 1.70179, size = 684, normalized size = 4.41 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^7/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-4/105*((759*sin(d*x + c)/(cos(d*x + c) + 1) + 444*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1249*sin(d*x + c)^3/(
cos(d*x + c) + 1)^3 - 1816*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 454*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 616
*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 1274*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 560*sin(d*x + c)^8/(cos(d*x
+ c) + 1)^8 - 385*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - 420*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 - 105*sin(d*
x + c)^11/(cos(d*x + c) + 1)^11 + 216)/(a^2 + 4*a^2*sin(d*x + c)/(cos(d*x + c) + 1) + 4*a^2*sin(d*x + c)^2/(co
s(d*x + c) + 1)^2 - 4*a^2*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 11*a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 8
*a^2*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 8*a^2*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 11*a^2*sin(d*x + c)^8/(
cos(d*x + c) + 1)^8 + 4*a^2*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 - 4*a^2*sin(d*x + c)^10/(cos(d*x + c) + 1)^10
- 4*a^2*sin(d*x + c)^11/(cos(d*x + c) + 1)^11 - a^2*sin(d*x + c)^12/(cos(d*x + c) + 1)^12) + 105*arctan(sin(d*
x + c)/(cos(d*x + c) + 1))/a^2)/d

________________________________________________________________________________________

Fricas [A]  time = 1.71709, size = 404, normalized size = 2.61 \begin{align*} -\frac{210 \, d x \cos \left (d x + c\right )^{5} + 105 \, \cos \left (d x + c\right )^{6} - 420 \, d x \cos \left (d x + c\right )^{3} - 389 \, \cos \left (d x + c\right )^{4} - 173 \, \cos \left (d x + c\right )^{2} - 2 \,{\left (210 \, d x \cos \left (d x + c\right )^{3} + 281 \, \cos \left (d x + c\right )^{4} + 51 \, \cos \left (d x + c\right )^{2} - 5\right )} \sin \left (d x + c\right ) + 25}{105 \,{\left (a^{2} d \cos \left (d x + c\right )^{5} - 2 \, a^{2} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right ) - 2 \, a^{2} d \cos \left (d x + c\right )^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^7/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/105*(210*d*x*cos(d*x + c)^5 + 105*cos(d*x + c)^6 - 420*d*x*cos(d*x + c)^3 - 389*cos(d*x + c)^4 - 173*cos(d*
x + c)^2 - 2*(210*d*x*cos(d*x + c)^3 + 281*cos(d*x + c)^4 + 51*cos(d*x + c)^2 - 5)*sin(d*x + c) + 25)/(a^2*d*c
os(d*x + c)^5 - 2*a^2*d*cos(d*x + c)^3*sin(d*x + c) - 2*a^2*d*cos(d*x + c)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4*sin(d*x+c)**7/(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.3241, size = 236, normalized size = 1.52 \begin{align*} -\frac{\frac{1680 \,{\left (d x + c\right )}}{a^{2}} + \frac{1680}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )} a^{2}} - \frac{35 \,{\left (12 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 27 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 13\right )}}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1\right )}^{3}} + \frac{3780 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} + 25095 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 68845 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 98350 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 75222 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 29659 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 4777}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1\right )}^{7}}}{840 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4*sin(d*x+c)^7/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/840*(1680*(d*x + c)/a^2 + 1680/((tan(1/2*d*x + 1/2*c)^2 + 1)*a^2) - 35*(12*tan(1/2*d*x + 1/2*c)^2 - 27*tan(
1/2*d*x + 1/2*c) + 13)/(a^2*(tan(1/2*d*x + 1/2*c) - 1)^3) + (3780*tan(1/2*d*x + 1/2*c)^6 + 25095*tan(1/2*d*x +
 1/2*c)^5 + 68845*tan(1/2*d*x + 1/2*c)^4 + 98350*tan(1/2*d*x + 1/2*c)^3 + 75222*tan(1/2*d*x + 1/2*c)^2 + 29659
*tan(1/2*d*x + 1/2*c) + 4777)/(a^2*(tan(1/2*d*x + 1/2*c) + 1)^7))/d